Component({
    properties: {
        treeListIndex: {
            type: Number,
            value: 0
        },
        data: {
            type: Array,
            value: []
        },
        prop: {
            type: Object,
            value: {
                label: "name",
                children: "child"
            }
        },
        currentid: {
            type: Number,
            value: 0
        },
        key: {
            type: String,
            value: "id"
        }
    },
    lifetimes: {
        attached: function() {}
    },
    data: {
        collapse: !1
    },
    methods: {
        tapTreeItemCollapse: function(e) {
            var t = e.currentTarget.dataset.item;
            void 0 !== t[this.data.prop.children] && t[this.data.prop.children].length > 0 && this.setData({
                collapse: !this.data.collapse
            });
        },
        treenodetap: function(e) {
            var t = e.currentTarget.dataset.item || e.detail.item;
            this.triggerEvent("treeTap", {
                item: t
            });
        }
    }
});